Lens Controller
Loading...
Searching...
No Matches
VA Imaging Lens Controller API

VA Imaging Lens Controllers

VA Imaging has developed a Lens Controller to control motorized Focus/Zoom/Iris lenses. VA Imaging also sells a controller specifically designed to control a Focus Lens. This API can be used to communicate with both the the AFZ controller and the Focus controller.

VA Imaging AFZ Lens Controller

The VA Imaging AFZ Lens Controller is a device developed by VRW Technology. The lens controller has support for multiple types of lenses and can controll the zoom, focus and iris functions of a camera lens through commands over a serial connection. It has the following connections:

  • 24VDC power (min 500mA)
  • USB-C connector for serial communication (virtual com port)
  • RS232 connector for serial communnication
  • Focus & zoom connector for the VA Imaging AFZ-lenses
  • Iris connector for the VA Imaging AFZ-lenses
  • Amphenol pluggable terminal (5-pins) for external preset selection. Can be connected to external trigger sources e.g. a camera or PLC

Focus Lens Controller

VA Imaging also has a Lens Controller for specific focus lenses. The API mentioned below can also be used to control the Focus Lens Controller. It has the following applicable connections:

  • 24VDC power
  • RS-232/TTL UART
  • Connector for Focus lens

VA Imaging Lens Controller API

This module provides the api.LensControllerAFZ and the api.LensControllerFocus, classes for interfacing with the VA Imaging and Focus lens controller hardware over a serial connection.

The AFZ lens controller can control the focus, zoom and iris of a stepper motor lens.

API Features for AFZ Lens Controller

The lens controller has an internal positioning system. By calibrating the lens controller, the positioning system is calibrated and the system will know the position of each motor at all times. The positionint system is used for setting and calling presets and for moving to a specific position. The lens controller supports the Pelco D protocol with the following commands:

  • Zoom In
  • Zoom Out
  • Focus Near
  • Focus Far
  • Iris Open
  • Iris Close
  • Call Preset
  • Set Preset
  • Set Zoom Speed
  • Set Focus Speed
  • Stop all motors

In addition, the following custom commands are supported:

  • Select lens type

    ‍Select the type of lens connected to the lens controller (custom_select_lens_default_afz, custom_select_lens_AFZ2)

  • Get lens type

    ‍Get the type of lens the controller is configured for

  • Calibrate all

    ‍Calibrate all connected motors. During calibration the maximum and minimum position of the lens is Determined. The resolution of the controller is very high, small deviation around 1% are allowed and are not visually noticable. To get the maximum position determined during calibration: Use Pelco D command to move the motor to the maximum position and call the get-position-command. The minimum position is always 0.

  • get zoom position

    ‍Get the current position of the zoom motor. The returned value is a value between max and min determined during calibration.

  • set zoom position

    ‍Set the absolute position of the zoom motor. The value should between 0 and the maximum position determined during calibration. Values larger than maximum are automatically set to maximum.

  • get focus position

    ‍Get the current position of the zoom motor. The returned value is a value between max and min determined during calibration.

  • set focus position

    ‍Set the absolute position of the focus motor. The value should between 0 and the maximum position determined during calibration. Values larger than maximum are automatically set to maximum.

  • get iris position

    ‍Get the current position of the zoom motor. The returned value is a value between max and min determined during calibration.

  • set iris position

    ‍Set the absolute position of the iris motor. The value should between 0 and the maximum position determined during calibration. Values larger than maximum are automatically set to maximum.

  • set sensitivity mode

    ‍Set the sensitivity mode of the motors. The default is 0; 1 makes the calibration less sensitive and is used for longer cables.

  • get sensitivity mode

    ‍Get the current sensitivity mode of the controller. 0 for default; 1 for less sensitive (used for longer cables).

  • Store current settings in lenscontroller

    ‍When power is removed, the lens controller will be restored to its factory defaults. The store current settings command will store speed, lens type, presets, calibration values and current positions in the permanent memory of the lens controller. These values will be restored after a power cycle.

API Features for Focus Lens Controller

The Focus lens controller has an internal positioning system. The current position can be read from the controller.

The focus lens has an integrated position sensor that has a resolution of 16384 steps per 360 degrees rotation of the motor. Between the begin and end position of the lens are 2.93 rotations of the motor, approximately 48000 steps. When power is applied to the lens, the current position value of the lens will be reset to 0, even if the position is not at the focus far position. Focussing far will decrement the position value, meaning the position value can become negative. The get_end_positions method can be used to determine the new absolute end positions of the lens after the controller has been power-cycled.

The lens controller supports the following commands: